# This module is to help execute queries on sweetII.
# http://www.dkfz-heidelberg.de/spec/sweet2/
#
# It requires SOAPpy obtainable from http://pywebsvcs.sourceforge.net/
import SOAPpy;


class SweetII:
	def __init__(self):	
		sweeturl = "http://www.dkfz-heidelberg.de/spec/sweet2/soap/function_soap.php";
		sweetns = "urn:xmethods-BNSweet";
		# EDIT ME!
		sweetproxy = "tur-cache1.massey.ac.nz:8080"; # Work around Massey's stupid proxy - most ppl won't need this.

		# Initialize the SOAP
		self._sweetpx = SOAPpy.SOAPProxy(sweeturl, sweetns, http_proxy=sweetproxy);


	# Now pretty much the clients can just call gen_sweet(string) and returns results
	def gen_sweet(self, str):
		return self._sweetpx.gen_sweet(str);

	def gen_sweet_with_linucs(self,str):
		return self._sweetpx.gen_sweet_with_linucs(str);
